Skip to content

Conversation

@ustcweizhou
Copy link
Contributor

Description

When we add new guest os, sometimes we missed the records in guest_os_hypervisor.
However, the guest disk model (virtio/ide) is determined by record in the table.
It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk.

To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor.

Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Screenshots (if appropriate):

How Has This Been Tested?

@svenvogel
Copy link
Contributor

@weizhouapache can you explain it me a little bit better. if i understand it correctly if guestosmapping and host is null then we set guestOS.getDisplayName(). why display name? maybe i stand on the line 😕

@weizhouapache
Copy link
Member

@weizhouapache can you explain it me a little bit better. if i understand it correctly if guestosmapping and host is null then we set guestOS.getDisplayName(). why display name? maybe i stand on the line 😕

@svenvogel
here is an example:
in guest_os, we have Debian 9

mysql> select id,name,display_name from guest_os where id in (289,290);
+-----+------+-----------------------------+
| id  | name | display_name                |
+-----+------+-----------------------------+
| 289 | NULL | Debian GNU/Linux 9 (32-bit) |
| 290 | NULL | Debian GNU/Linux 9 (64-bit) |
+-----+------+-----------------------------+
2 rows in set (0.01 sec)

however, in guest_os_hypervisor, there is no record for these guest oses on kvm

mysql> select * from guest_os_hypervisor where guest_os_id in (289,290) and hypervisor_type='KVM';
Empty set (0.00 sec)

when we start a vm with Debian 9, in StartCommand it shows

"arch":"x86_64","os":"Debian GNU/Linux 9 (64-bit)","platformEmulator":"Other"

so vm is started with ide disk and e1000 nic.

with this change, "platformEmulator" will be set to same value as "os"

@yadvr yadvr added this to the 4.13.1.0 milestone Feb 13, 2020
@yadvr
Copy link
Member

yadvr commented Feb 13, 2020

Some testing required - @DaanHoogland @andrijapanicsb

@andrijapanicsb
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-856

}
if (guestOsMapping == null || host == null) {
to.setPlatformEmulator("Other");
to.setPlatformEmulator(guestOS.getDisplayName());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ustcweizhou how about we check and fallback to "Other" in case guestOS.getDisplayName() is null or empty (unlikely but just to make code more defensive)?

Copy link
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, left a minor remark. Did not test it.

@yadvr
Copy link
Member

yadvr commented Feb 14, 2020

@blueorangutan test

@blueorangutan
Copy link

@rhtyd a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@DaanHoogland
Copy link
Contributor

sorry @weizhouapache, i editted according to @rhtyd 's comment (kinda, revert if you want)

@weizhouapache
Copy link
Member

@DaanHoogland thanks Daan !
I changed unknown to Other

@yadvr
Copy link
Member

yadvr commented Feb 17, 2020

@blueorangutan package

@blueorangutan
Copy link

@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✖centos6 ✔centos7 ✔debian. JID-887

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-1015)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 28098 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr3879-t1015-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_privategw_acl.py
Smoke tests completed. 76 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_02_vpc_privategw_static_routes Failure 190.76 test_privategw_acl.py
test_03_vpc_privategw_restart_vpc_cleanup Failure 187.20 test_privategw_acl.py
test_04_rvpc_privategw_static_routes Failure 269.84 test_privategw_acl.py

@yadvr
Copy link
Member

yadvr commented Feb 19, 2020

Tests LGTM, the failures are known issue

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM based on code changes and travis

@yadvr yadvr merged commit 37d2b85 into apache:4.13 Feb 19, 2020
nvazquez pushed a commit to shapeblue/cloudstack that referenced this pull request Feb 21, 2020
When we add new guest os, sometimes we missed the records in guest_os_hypervisor.
However, the guest disk model (virtio/ide) is determined by record in the table.
It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk.

To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor.

Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0
nvazquez pushed a commit to shapeblue/cloudstack that referenced this pull request Feb 21, 2020
When we add new guest os, sometimes we missed the records in guest_os_hypervisor.
However, the guest disk model (virtio/ide) is determined by record in the table.
It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk.

To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor.

Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0
ggoodrich-ipp pushed a commit to ippathways/cloudstack that referenced this pull request Feb 24, 2020
When we add new guest os, sometimes we missed the records in guest_os_hypervisor.
However, the guest disk model (virtio/ide) is determined by record in the table.
It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk.

To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor.

Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0
ustcweizhou added a commit to ustcweizhou/cloudstack that referenced this pull request Feb 28, 2020
When we add new guest os, sometimes we missed the records in guest_os_hypervisor.
However, the guest disk model (virtio/ide) is determined by record in the table.
It causes the issue that some new guest os(eg Debian 8/9) uses e1000 instead of virtio nic, and ide disk instead of virtio disk.

To fix the issue permanantly, pass the guest os name in guest_os if the record for kvm is not found in guest_os_hypervisor.

Related commit:7ac9f00eeeb4cd37ec39efeba066e799b581b1a0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants